package com.example.demo.cn.edu.qzit.cmj.service;

import com.example.demo.cn.edu.qzit.cmj.domain.User;
import com.example.demo.cn.edu.qzit.cmj.mappers.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;
    public List<User> findList(){
        return userMapper.list();
    }
    public int save(User user){
        return userMapper.save(user);
    }
    public int delete(Integer id){
        return userMapper.delete(id);
    }
    public int update(User user){
        return userMapper.update(user);
    }

    public User findById(Integer id){
        return userMapper.findById(id);
    }
}
